<?php

namespace app\modules\core;

use Yii;

/**
 * core module definition class
 */
class Module extends \yii\base\Module
{
    /**
     * @inheritdoc
     */
    public $controllerNamespace = 'app\modules\core\controllers';

    public $layout = 'default';

    /**
     * @inheritdoc
     */
    public function init()
    {
        parent::init();

        // custom initialization code goes here
        if (Yii::$app instanceof \yii\web\Application) {
            $this->controllerNamespace = __NAMESPACE__ . '\\controllers';
        }
        if (Yii::$app instanceof \yii\console\Application) {
            $this->controllerNamespace = __NAMESPACE__ . '\\console';
        }
    }
}
